import { showToast } from '@/components/Toast';
import { request } from '@/utils/front';

export async function getAuthorList() {
  const res = await request.get<any, APIRes<any[]>>('/api/author');

  if (res.success) {
    return res.data;
  } else {
    showToast({ message: res.message });
    return false;
  }
}
